<script src="lib/plupload-2.1.2/js/plupload.full.min.js"></script>

<div class="row" ng-controller="DoctorCtrl">

    <div class="col-sm-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <strong>医生列表</strong>
            </div>

            <div class="panel-body">
                <a id="add_user" role="button" class="btn btn-primary btn-sm" ng-click="add()">
                    <i class="glyphicon glyphicon-plus">
                    </i> 添加医生
                </a>
                <a id="add_research" role="button" ng-show="role ==1" class="btn btn-primary btn-sm" ng-click="add_reasearch()">
                    <i class="glyphicon glyphicon-plus">
                    </i> 添加学术服务
                </a>
                <div clss="table-container">
                    <div id="outerdiv">
                        <div id="innerdiv">
                            <table st-pipe="callServer" st-table="displayed" class="table table-striped">
                                <thead>
                                <tr>
                                    <th st-ratio="6" st-sort="name">姓名</th>
                                    <th st-ratio="6" st-sort="name">职称</th>
                                    <th st-ratio="6" st-sort="name">专业</th>
                                    <th st-ratio="10" st-sort="phone">联系电话</th>
                                    <th st-ratio="20" st-sort="province">所属医院</th>
                                    <th st-ratio="24" st-sort="introduce" st-align-center>简介</th>
                                    <th st-ratio="8" st-align-center>学术服务</th>
                                    <th st-ratio="14" st-align-center>操作</th>
                                </tr>
                                <tr>
                                    <th st-ratio="12" colspan="2">
                                        <input st-search="name" placeholder="通过医生姓名查询" class="input-sm form-control" type="search"/>
                                    </th>
                                </tr>
                                </thead>
                                <tbody ng-hide="isLoading">
                                <tr ng-repeat="row in displayed">
                                    <td st-ratio="6">{{row.name}}</td>
                                    <td st-ratio="6">{{row.title}}</td>
                                    <td st-ratio="6">{{row.major}}</td>
                                    <td st-ratio="10">{{row.phone}}</td>
                                    <td st-ratio="20">{{row.province.name}}-{{row.hospital.name}}-{{row.office.name}}</td>
                                    <td st-ratio="24">{{row.introduce}}</td>
                                    <td st-ratio="8" st-align-center>
                                        <div ng-show="row.has_research==true">
                                            <a href="#/research_list/{{row._id}}">
                                                有
                                            </a>
                                        </div>
                                        <div ng-show="row.has_research==false">
                                            无
                                        </div>
                                    </td>
                                    <td ratio="14" st-align-center>

                                        <button type="button" ng-click="editDoctor($index)" class="btn btn-sm btn-primary">
                                            <i class="glyphicon glyphicon-pencil">
                                            </i>
                                        </button>

                                        <button type="button" ng-click="removeItem($index)" class="btn btn-sm btn-danger">
                                            <i class="glyphicon glyphicon-remove-circle">
                                            </i>
                                        </button>
                                    </td>
                                </tr>
                                </tbody>
                                <tbody ng-show="isLoading">
                                <tr>
                                    <td colspan="4" class="text-center">Loading ... </td>
                                </tr>
                                <tfoot>
                                <tr>
                                    <!--<td class="text-center" st-pagination="" st-items-by-page="10" colspan="4"></td>-->
                                    <td colspan="9" class="text-center">
                                        <div st-items-by-page="10" colspan="40" st-pagination="" st-template="partials/pagination.custom.html"></div>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>